package junit.text;


import java.util.Date;

import org.junit.Test;

import cn.itcast.dao.UserDao;
import cn.itcast.dao.impl.UserDaoImpl;
import cn.itcast.domain.User;

public class UserDaoTest {
	@Test
	public void test() {
		
		User user = new User();
		user.setBirthday(new Date());
		user.setEmail("aaa@qq.com");
		user.setId("21321421");
		user.setNicname("safa");
		user.setUsername("ssss");
		user.setPassword("123123");
		
		UserDao dao = new UserDaoImpl();
		dao.add(user);
		
	}
	
	@Test
	public void findtest() {
		UserDao dao = new UserDaoImpl();
		User user = dao.find("aaa","123");
		System.out.println(user.getEmail());
		
	}
}
